import { createRouter, createWebHashHistory } from "vue-router";
import home from '../views/Page1.vue'
const routerHistory = createWebHashHistory();
const routes = [
    {
        path: "/",
        name: "/",
        redirect:'/home'
    },
  {
    path: "/home",
    name: "Home",
    component:home,
  },
  {
    path: "/page2",
    name: "page2",
    component:()=>import('../views/Page2.vue')
  },
  {
    path: "/page3",
    name: "page3",
    component:()=>import('../views/Page3.vue')
  },
  {
    path: "/*",
    name: "404",
    redirect:'/home'
  },
];

const router = createRouter({
  history: routerHistory,
  routes,
});

export default router;
